<template>
  <Design />
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { useRoute } from 'vue-router'
import Design from '@/components/form-engine/design/index.vue'
import { useFlowStore } from '@/stores/flow'
import { formDefApi } from '@/api/modules/flow/formDef'

const route = useRoute()

const fs = useFlowStore()

const getStructure = () => {
  formDefApi.findStructureByFormId(route.query.id as string).then(resp => {
    fs.setData(resp.data)
  })
}
onMounted(getStructure)
</script>

<style lang="scss" scoped></style>
